<!DOCTYPE html>
<html lang="en">
<head>
    <title>库存管理</title>
</head>
<body>
<div class="page-container">
    <div class="page-content">
        <div class="container">
            <div class="page-bar" style="background-color: #fff;margin-bottom: 5px;margin-top: 10px;">
                <ul class="page-breadcrumb">
                    <li>
                        <i class="glyphicon glyphicon-cog"></i>
                        <span>库存信息管理</span>
                    </li>
                </ul>
                <div class="page-toolbar">
                    <div class="btn-group pull-right">
                        <ul class="page-breadcrumb">
                            <li>
                                <a href="${rootPath}/productManage/toPage/stockManageView">
                                    <span class="font-black-sharp activity">库存管理</span></a>
                            </li>
                            <li>
                                |<a href="${rootPath}/productManage/toPage/stockChangeHisView">
                                <span class="font-black-sharp">库存变动历史</span></a>
                            </li>
                        </ul>
                    </div>
                </div>
            </div>
            <div class="row">
                <div class="col-md-12">
                    <div class="portlet light bordered">
                        <div class="portlet-title">
                            <div class="caption">
                              <span class="caption-subject font-green-sharp bold uppercase">
                              <i class="fa fa-gift"></i> 搜索条件
                              </span>
                            </div>
                        </div>
                        <div class="portlet-body form">
                            <form action="javascript:;" id="searchForm" class="form-horizontal">
                                <div class="form-body">
                                    <div class="col-lg-4 col-md-6 col-sm-6 col-xs-12">
                                        <div class="form-group">
                                            <label class="col-md-4 control-label">产品编号：</label>
                                            <div class="col-md-8">
                                                <input class="form-control" type="text" id="productId" name="productId">
                                            </div>
                                        </div>
                                    </div>
                                    <div class="col-lg-4 col-md-6 col-sm-6 col-xs-12">
                                        <div class="form-group">
                                            <label class="col-md-4 control-label">产品名称：</label>
                                            <div class="col-md-8">
                                                <input class="form-control" type="text" id="productName" name="productName">
                                            </div>
                                        </div>
                                    </div>
                                    <div class="col-lg-4 col-md-6 col-sm-6 col-xs-12">
                                        <div class="form-group">
                                            <label class="col-md-4 control-label">作者：</label>
                                            <div class="col-md-8">
                                                <input class="form-control" type="text" id="author" name="author">
                                            </div>
                                        </div>
                                    </div>
                                    <div class="col-lg-4 col-md-6 col-sm-6 col-xs-12">
                                        <div class="form-group">
                                            <label class="col-md-4 control-label">出版社：</label>
                                            <div class="col-md-8">
                                                <input class="form-control" type="text" id="press" name="press">
                                            </div>
                                        </div>
                                    </div>
                                    <div class="col-lg-4 col-md-6 col-sm-6 col-xs-12">
                                        <div class="form-group">
                                            <label class="col-md-4 control-label">类别：</label>
                                            <div class="col-md-8">
                                                <select class="hasReward form-control" name="type"
                                                        id="type" >
                                                    <option value="">请选择</option>
                                                    <option value="1">文学</option>
                                                    <option value="2">哲学</option>
                                                    <option value="3">理工</option>
                                                    <option value="4">经济</option>
                                                    <option value="5">艺术</option>
                                                    <option value="6">政治</option>
                                                    <option value="7">其他</option>
                                                </select>
                                            </div>
                                        </div>
                                    </div>
                                    <div class="col-lg-4 col-md-6 col-sm-6 col-xs-12">
                                        <div class="form-group">
                                            <label class="col-md-4 control-label">产品状态：</label>
                                            <div class="col-md-8">
                                                <select class="hasReward form-control" name="state"
                                                        id="state" >
                                                    <option value="">请选择</option>
                                                    <option value="0">作废</option>
                                                    <option value="1">在用</option>
                                                </select>
                                            </div>
                                        </div>
                                    </div>
                                    <div class="col-lg-4 col-md-6 col-sm-6 col-xs-12">
                                        <div class="form-group">
                                            <label class="col-md-4 control-label">开始时间：</label>
                                            <div class="col-md-8">
                                                <input class="form-control" placeholder="请选择最早启动时间" type="text"
                                                       id="startTime" name="startTime"
                                                       onClick="WdatePicker({dateFmt: 'yyyy-MM-dd'});">
                                            </div>
                                        </div>
                                    </div>
                                    <div class="col-lg-4 col-md-6 col-sm-6 col-xs-12">
                                        <div class="form-group">
                                            <label class="col-md-4 control-label">结束时间：</label>
                                            <div class="col-md-8">
                                                <input class="form-control" placeholder="请选择最迟结束时间" type="text"
                                                       id="endTime" name="endTime"
                                                       onClick="WdatePicker({dateFmt: 'yyyy-MM-dd'});">
                                            </div>
                                        </div>
                                    </div>
                                </div>
                                <div class="row">
                                    <div class="text-right">
                                        <button type="button" class="btn green" onclick="selectProductList()">查询
                                        </button>
                                        <button type="button" id="resetBtn" class="btn">重置
                                        </button>
                                    </div>
                                </div>
                            </form>
                        </div>
                    </div>
                </div>
            </div>
            <div class="row">
                <div class="col-md-12">
                    <div class="portlet light bordered">
                        <div class="portlet-title">
                            <div class="caption">
                              <span class="caption-subject font-green-sharp bold uppercase">
                              <i class="fa fa-gift"></i> 产品列表
                              </span>
                            </div>
                            <div class="actions btn-set text-right">
                                <button class="btn green btn-circle"
                                        onclick="addStock()">
                                    <a class="fa fa-plus" style="text-decoration:none;color: #FFFFFF">添加库存</a>
                                </button>
                            </div>
                        </div>
                        <div class="portlet-body">
                            <table id="productTable"
                                   class="table table-striped table-bordered table-hover"
                                   data-toggle="table"
                                   data-method="post"
                                   data-content-type="application/x-www-form-urlencoded"
                                   data-query-params="queryParams"
                                   data-pagination="true"
                                   data-click-to-select="true"
                                   data-side-pagination="server"
                                   data-page-number="1"<#--第几页-->
                                   data-page-size="5"<#--每页数据条数-->
                                   data-page-list="[10, 20, 50, 200]"
                                   data-search-align = "left"
                            >
                                <thead>
                                <tr>
                                    <th data-radio="true" checkbox="true" ></th>
                                    <th data-field="product_id">产品编号</th>
                                    <th data-field="stock" >库存量</th>
                                    <th data-field="product_name">产品名称</th>
                                    <th data-field="author">作者</th>
                                    <th data-field="press" >出版社</th>
                                    <th data-field="type_name" >类别</th>
                                    <th data-field="price" >价格</th>
                                </tr>
                                </thead>
                            </table>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>
</div>
<script src="${basePath}/static/module/productManage/stockManage.js${jsResourceVersion}"></script>
</body>
</html>